home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PASCALL
/
TEMPJUNK
/
FERNG.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-10-14
|
851b
|
47 lines
program gottt;
uses
crt, graph,dos;
var
x1, x2, y1, y2, sx, sy, y, i, radius, gd, gm:integer;
procedure update;
begin
x1:=x1+sx;
y1:=y1+sy;
setcolor(getmaxcolor);
circle(x1,y1,radius);
setcolor(0);
circle(x2,y2,radius);
end;
procedure go;
begin
x2:=x1;
y2:=y1;
if x1+sx>(getmaxx-radius) then sx:=(sx*(-1));
if x1+sx<radius then sx:=(sx*(-1));
if y1+sy>(getmaxy-radius) then sy:=(sy*(-1));
if y1+sy<radius then sy:=(sy*(-1));
update;
end;
begin
setcbreak(true);
clrscr;
gd:=detect;
initgraph(gd,gm,'');
{ if gd<>grOK then halt;}
radius:=24;
sx:=3;
sy:=8;
x1:=radius;
y1:=radius;
x2:=radius;
y2:=radius;
y:=0;
for i:=1 to 10000 do go;
closegraph;
end.